<?php
namespace app\demo\controller;

use app\BaseController;
use think\Exception;

class Error extends BaseController
{
    public function __call($name, $arguments)
    {
//        $result = [
//            "status" => 0,
//            "msg" => "请求控制键不存在",
//            "res" => null
//        ];
//        return json($result, 400);

        $con = $this->request->controller();
        $con = lcfirst($con);
        return show(config("status.controller_not_found"), "请求控制器{$con}不存在", null);
    }

    public function abc()
    {

    }

    public function abca()
    {
        throw new \think\exception\HttpException("400", "找不到相应的数据");
    }


}
